import request from '../utils/request'
// 获取频道列表
export const getChannelsList = () => request('channels', 'get')
// 获取文章列表
export const getArticleList = (data) => request('mp/articles', 'get', data)
// 删除文章
export const delArticleList = (id) => request(`mp/articles/${id}`, 'DELETE')
// 发布文章
export const addArticle = (data , params) => request(`mp/articles?draft=${params}`, 'POST', data)
// 编辑文章
export const editArticle = (data, params, id) => request(`mp/articles/${id}?draft=${params}`, 'PuT', data)
// 获取文章详情
export const getArticle = (id) => request(`mp/articles/${id}`, 'GET')